@use 'colors';
@use 'shared';
@use 'header';
@use 'z-index';

.GeoGebraFrame {
	.providers {
		width: 70px;
		float: right;
		padding-left: 2px;
	}

	.providers .button {
		width: 50px;
		height: 50px;
		padding: 10px;
		-moz-box-sizing: content-box;
		box-sizing: content-box;
		border: none;
		background: none;
		position: relative;
		cursor: pointer;
	}

	.providers .button.selected {
		background-image: -webkit-linear-gradient(left, #EDEDED, #FAFAFA);
		background-image: -moz-linear-gradient(left, #EDEDED, #FAFAFA);
		background-image: -ms-linear-gradient(left, #EDEDED, #FAFAFA);
		background-image: -o-linear-gradient(left, #EDEDED, #FAFAFA);
		background-image: linear-gradient(left, #EDEDED, #FAFAFA);
		filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1,
			startColorstr='#EDEDED', endColorstr='#FAFAFA' );
		zoom: 1;
		box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px
			rgba(0, 0, 0, 0.05);
	}

	/* +++ BrowseGUI CONTENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
	
	.browsegui {
		background-color: white;
	}

	/* to avoid scrollbars on tablets and mac */
	.browsegui > div:nth-child(1), .browsegui > div:nth-child(1) > div {
		overflow: hidden !important;
	}

	.searchDiv {
		margin: 15px 10px;
		position: relative;
		float: left;
	}
	
	.searchDiv .searchButton {
		position: absolute;
		top: 6px;
		left: 6px;
		z-index: z-index.$z-open-screen-search-button;
		cursor: pointer;
	}
	
	.searchDiv input.gwt-TextBox {
		padding-left: 35px;
		padding-right: 35px;
		z-index: z-index.$z-open-screen-search-input;
		color: #999999;
		width: 100%;
	}
	
	.searchDiv .cancelButton {
		z-index: z-index.$z-open-screen-search-button;
		position: absolute;
		top: 8px;
		right: 8px;
		cursor: pointer;
	}

	/* ++++++  MaterialListPanel   ++++++++ */
	.materialListPanel {
		padding: 20px;
		overflow-y: scroll;
		box-sizing: border-box;
		-moz-box-sizing: border-box;
		-webkit-box-sizing: border-box;
		box-shadow: 0px 0px 2px 1px rgba(102, 102, 102, 0.3);
		background-color: white;
	}

	.ggbChapterName{
		clear: both;
		font-size: 30px;
		padding-bottom: 10px;
	}

	.materialListElement {
		width: 182px;
		height: 250px;
		margin-right: 15px;
		margin-bottom: 15px;
		float: left;
		position: relative;
	}

	.materialElementContent {
		position: relative;
	}
	
	.materialListElement .fileImage {
		width: 170px;
		height: 170px;
		padding: 5px;
		overflow: hidden;
		border-radius: 5px;
		border: 1px solid #CCCCCC;
		box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
		border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
	}
	
	.materialListElement .fileImage .background {
		width: 170px;
		height: 170px;
		background-repeat: no-repeat;
		background-position: center center;
		background-size: cover;
	}
	
	.materialListElement .infoPanel .sharedPanel {
		font-size: 80%;
		padding-bottom: 5px;
	}

	/** default style of material **/
	.materialListElement.default {
		cursor: pointer;
	}
	
	.materialListElement.default:hover .fileImage {
		border-color: #6161FF;
	}
	
	.materialListElement .infoPanel .fileTitle {
		max-height: 40px;
		overflow: hidden;
		padding-top: 7px;
		word-wrap: break-word;
	}
	
	/** Material is selected **/
	.materialListElement.selected .materialElementContent {
		border-radius: 10px;
		border: 1px solid #CCCCCC;
		border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
		cursor: default;
		padding: 15px;
		z-index: z-index.$z-open-screen-card-content;
		background-color: rgba(255, 255, 255, 0.9);
		box-shadow: 1px 1px 6px rgba(0, 0, 0, 0.25);
		position: absolute;
		top: -16px;
		left: -16px;
	}
	
	.materialListElement.selected .infoPanel .fileTitle {
		max-height: 70px;
	}
	
	.materialListElement.selected .infoPanel .renameBox {
		margin-left: -5px;
		width: 192px;
		margin-right: -5px;
		margin-top: 2px;
	}
	
	.materialListElement.selected .fileImage {
		border-color: #6161FF;
		cursor: pointer;
	}
	
	.materialListElement.selected .infoPanel .button {
		cursor: pointer;
		width: 100%;
		padding: 2px 0px 2px 0px;
	}
	

	.Tablet .materialListElement.selected .infoPanel .button {
		padding-top: 5px;
		padding-bottom: 5px;
	}
	
	.materialListElement.default .infoPanel .Separator {
		display: none;
	}
	
	.materialListElement .infoPanel .Separator {
		display: none;
	}
	.materialListElement.selected .infoPanel .Separator {
		margin-bottom: 5px;
		display: block;
	}
	
	.materialListElement .infoPanel .button:hover,
	.materialListElement .infoPanel .button:active {
		background-color: #CCCCFF;
	}
	
	.materialListElement .button .gwt-Image {
		vertical-align: middle;
		display: inline-block;
		margin-right: 5px;
	}
	
	.materialListElement .infoPanel.detailed .button .gwt-Label {
		display: inline-block;
		vertical-align: middle;
	}
	 
	.materialListElement.selected .infoPanel.detailed .deleteActive {
		color: #6161FF;
	}
	
	.materialListElement.selected .infoPanel.detailed .confirmDelete {
		margin-top: 5px;
	}
	
	.materialListElement.selected .infoPanel.detailed .confirmDelete .button {
		text-align: center;
		width: 80%;
		margin-bottom: 5px;
		padding: 4px 14px;
	}
	
	.materialListElement .cancelButton {
		float: right;
	}
	
	.materialListElement .deleteButton {
		float: left;
	}
	
	/** Material is unselected **/
	.materialListElement.unselected {
		opacity: 0.2;
		filter: alpha(opacity = 20);
	}

	.materialListElement.unselected:hover {
		cursor: default;
	}
	
	.materialListElement.unselected:hover .fileImage {
		border-color: #CCCCCC;
		cursor: default;
	}
	
		button.gwt-Button.signInButton {
		margin-top: 6px;
	}

	.profilePanel {
		cursor: pointer;
		text-align: center;
		padding-right: 10px;
		width: 40px;
		height: 40px;
		overflow: hidden;
	}

	.profilePanel .profileImage {
		width: 40px;
		border-radius: 50%;
	}

	.profilePanel .optionsArrow {
		position: absolute;
		right: 0px;
		bottom: 0px;
	}

	.profileOptionsPanel {
		position: relative;
		z-index: z-index.$z-profile-options-panel;
	}

	.profileOptionsPanel .arrow {
		display: none;
	}

	.profileOptionsPanel .profileOptionsContent {
		position: relative;
		z-index: z-index.$z-profile-options-panel;
		border-radius: 2px;
		padding: 5px;
		background-color: colors.$white;
	
		.username {
			display: block;
			padding: 4px;
			margin: 4px;
			line-height: 24px;
			text-align: center;
			color: colors.$purple-default;
		}
		 .editButton {
			@extend %primaryButton;
			border: 0;
			display: block;
			&:hover {
				border: 0;
			}
		}
		.logoutButton {
			@extend %matButton;
			display: block;
			width: calc(100% - 48px);
			color: colors.$black;
			border: 0;

			&:hover {			
				background-color: colors.$white;
			}
			div {
				text-align: center;
			}
		}
	}
	
	/* +++ OPEN FILE VIEW CONTENT +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
	
	.openFileView {
		background-color: white;
	
		.fileViewContentPanel {
			position: absolute;
			width: 100%;
			height: 100%;
			padding-top: 24px;
			overflow-y: auto;
			box-sizing: border-box;

			.infoErrorPanel {
				margin: 80px 0 40px 0;
			}

			.fileViewButtonPanel {
				margin-left: 24px;
				.containedButton {
					form {
						height: 0;
						
						input {
							cursor: pointer;
							position: relative;
							top: -48px;
							right: 0px; 
							width: 100%; 
							height: header.$button_height;
							font-size: 0px;
							opacity: 0; 
						}
					}	
				}
				.buttonMargin16 {
					margin-left: 16px;
				}
				.buttonMargin24 {
					margin-left: 24px;
				}
				.hover {
					background-color: colors.$mow_card_background_hover;
				}
			}
			.center {
				margin: 0px auto;
			}
			.gwt-ListBox {
				cursor: pointer;
				position: absolute;
				right: 24px;
				//margin-top: 36px;
				border-radius: 0px;
				box-shadow: none;
				border: none;
				padding: 8px;
				font-size: 90%;
				border-bottom: 1px solid colors.$tool-border;
				transition: border-bottom 0.3s ease-out;

				&:hover {
					border-bottom: 1px solid colors.$mow_primary !important;
				}
			}
			.materialPanel {
				position: absolute;
				top: 98px;
				padding: 8px 8px 8px 24px;
				box-sizing: border-box;
				width: 100%;

				.materialCard {
					float: left;
					border-radius: 2px;
					margin: 0 16px 16px 0;
					height: 206px;
					width: 232px;
					background-color: colors.$mow_material_card_bgd;
					box-shadow: 0 1px 1px 0 colors.$black-14, 0 2px 1px -1px colors.$black-12, 0 1px 3px 0 colors.$black-20;
					transition: box-shadow .25s;
					cursor: pointer;

					&:hover {
						box-shadow: 0 8px 10px 1px colors.$black-14, 0 3px 14px 2px colors.$black-12, 0 5px 5px -3px colors.$black-20;
					}

					.cardImgPanel {
						width: 232px;
						height: 120px;
						margin: 0px;
						background-repeat: no-repeat;
						background-position: center;
					}
				
					.cardInfoPanel {
						position: relative;
						
						.cardTitle {
							font-size: 125%;
							color: colors.$text-primary;
							line-height: 1;
							letter-spacing: 0.25px;
							padding: 8px 24px 1px 16px;
							text-overflow: ellipsis;
							font-weight: 500;
							max-height: 40px;
							overflow: hidden;
							white-space: nowrap;
						}	
					
						.cardAuthor {
							font-size: 87.5%;
							color: colors.$text-secondary;
							line-height: 20px;
							letter-spacing: 0.25px;
							padding: 6px 0px 12px 16px;
							text-overflow: ellipsis;
							position: absolute;
							font-weight: 400;
							top: 48px;
							overflow: hidden;
							white-space: nowrap;
							width: 178px;
						}
						
						.mowMoreButton {
							position: absolute;
							top: 48px;
							height: 24px !important;
							width: 24px;
							right: 0px;
							padding: 4px 6px 10px 8px;
							opacity: 0.54;
							cursor: pointer;

							&:hover {
								opacity: 1;
							}
						}
						.mowMoreButton.active {
							opacity: 1;
						}
					
						.visibilityPanel {
							position: absolute;
							top: 48px; 

							.gwt-Label {
								font-size: 88%;
								color: colors.$text-secondary;
								line-height: 20px;
								letter-spacing: 0.25px;
								text-overflow: ellipsis;
								font-weight: 400;
								padding-top: 2px;
								padding-bottom: 2px;
								margin: 5px 0px 9px 0px;
							}

							img {
								opacity: 0.54;
								margin: 4px 8px 10px 16px;
							}
						}
					}
				}
				.loadMoreFilesPanel {
					float: left;
					// .materialPanel has different side padding, make sure is centered
					width: calc(100% - 16px);
					margin-bottom: 16px;

					.dialogContainedButton {
						display: block;
						margin: auto;
						min-width: 140px;
						text-align: center;

						.spinner-border {
							display: inline-block;
							text-align: left;
							width: 10px;
							height: 10px;
							border: 3px solid colors.$white;
							border-right-color: transparent;
							border-radius: 50%;
							margin-top: 10px;
							-webkit-animation: spinner-border .75s linear infinite;
							animation: rotate 1s linear infinite;
						}

						.gwt-Label {
							letter-spacing: 1.07px;
						}

						@keyframes rotate {
							to {transform: rotate(360deg);}
						}
					}

					.spinner-button {
						.gwt-Label {
							display: inline-block;
							vertical-align: top;
							padding-left: 9px;
							letter-spacing: 1.07px;
						}
					}

					.loadMoreFilesLabel {
						min-height: 14px;
						line-height: 14px;
						text-align: center;
						margin: 8px 0px 8px 0px;
						font-size: 12px;
						color: colors.$black-54;
						letter-spacing: 1.07px;
					}
				}
			}

				.fileViewButtonPanel {
					display: table;
					border-collapse: separate;
					//border-spacing: 24px 0px;
				}
				.extendedFAB {
					cursor: pointer;
					min-width: 64px;
					height: 48px;
					border-radius: 2px;
					box-shadow: 0 1px 3px 0px colors.$black-20;
					transition: header.$button_hover_transition;
					vertical-align: middle;
					display: table-cell;

					img {
						float: left;
						width: 24px !important;
						height: 24px;
						padding: 12px 8px 12px 16px;
						background: none;
						margin: 0;
						border-radius: 0;
					}
					.gwt-Label {
						cursor: pointer;
						float: left;
						padding: 16px 20px 16px 0px;
						text-transform: uppercase;
						line-height: 1;
						white-space: nowrap;
					}
					form {
						height: 0;
						
						input {
							cursor: pointer;
							position: relative;
							top: -60px;
							right: 0px; 
							width: 100%; 
							height: 48px;
							font-size: 0px;
							opacity: 0; 
						}
					}	
				}
				.FABteal {
					background-color: colors.$mow_primary;
					&:hover {
						background-color: colors.$mow_primary_variant;
					}
					img {
						opacity: 1;
						filter: invert(100%);
					}
					.gwt-Label {
						color: colors.$white;
					}
				}
				.FABwhite {
					background-color: colors.$white;
					&:hover {
						background-color: colors.$mow_white_hover;
					}
					img {
						opacity: 0.54;
					}
					.gwt-Label {
						color: colors.$text-secondary;
					}
				}
		}
	}

	.openFileView.examTemporaryFiles {
		.materialPanel {
			top: 16px;

			.materialCard {
				height: 174px; // 206px - 32px
			}
		}
	}
}